home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
2_4.lha
/
2_4
/
2_4.c
next >
Wrap
Text File
|
1993-08-08
|
1KB
|
36 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
/ print the sizes of all of the fundamental types
include <stream.h>
include "2_4a.c" /* EXPAND */
nt main(int, char**)
pr("char", sizeof(char));
pr("short", sizeof(short));
pr("int", sizeof(int));
pr("long", sizeof(long));
pr("unsigned char", sizeof(unsigned char));
pr("unsigned short", sizeof(unsigned short));
pr("unsigned int", sizeof(unsigned int));
pr("unsigned long", sizeof(unsigned long));
pr("float", sizeof(float));
pr("double", sizeof(double));
pr("void *", sizeof(void *));
pr("char *", sizeof(char *));
pr("short *", sizeof(short *));
pr("int *", sizeof(int *));
pr("long *", sizeof(long *));
pr("unsigned char *", sizeof(unsigned char *));
pr("unsigned short *", sizeof(unsigned short *));
pr("unsigned int *", sizeof(unsigned int *));
pr("unsigned long *", sizeof(unsigned long *));
pr("float *", sizeof(float *));
pr("double *", sizeof(double *));
pr("int (*)()", sizeof(int (*)()));
return 0;